﻿// ParseCfg.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "ParseParam.h"
#include "fstream"

int _tmain(int argc, _TCHAR* argv[])
{
	suParamString data("", "");

	fstream fp;
	fp.open("d:\\1.cfg");
	string strData;
	if(fp.is_open())
	{
		fp.seekg(0,ios::end);
		unsigned int iSize = fp.tellg();
		fp.seekg(0,ios::beg);
		char *pBuffer = new char[iSize + 1];
		memset(pBuffer, 0, iSize + 1);
		fp.read(pBuffer, iSize*sizeof(char));pBuffer[iSize] = 0;
		fp.close();
		strData = string(pBuffer);
		delete[] pBuffer;
	}
	Parse(strData, data);

	int i;
	scanf("%d", i);
	return 0;
}

